fix: Remove unconditional bell ring for auto-approved tool calls (cli-21)#513
Merged
dwash96 merged 1 commit intoMay 12, 2026
Conversation
Co-authored-by: cecli (openai/gemini_cli_local/gemini-2.5-pro)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes an issue where notifications (bell rings) were being sent for every tool call in agent mode, even after the user had approved all tool calls with "(A)ll".
Problem
In agent mode, after a user approves all tool calls with "(A)ll",
ceclicontinued to send a notification (ring a bell) for every subsequent tool call that was automatically approved. This was annoying and unnecessary.Root Cause
The
_print_tool_call_infomethod incecli/coders/base_coder.pyunconditionally calledself.io.ring_bell()before checking if user confirmation was actually required. The confirmation check itself (io.confirm_ask) is smart enough not to prompt (and thus not to notify) if an "all" preference is already registered, but the bell had already been rung.Solution
Removed the unconditional
self.io.ring_bell()call from the_print_tool_call_infomethod. The bell/notification is already correctly handled within theio.confirm_askmethod, which is called right after_print_tool_call_info. This ensures the notification only triggers when the user is actually being prompted for confirmation.Changes
cecli/coders/base_coder.py: Removedself.io.ring_bell()from_print_tool_call_infomethodTesting
User tested manually in agent mode:
cecliin agent modeFixes: cli-21